var express = require('express');
var router = express.Router();
let upload = require("../utils/multer");

router.post("/uploads", upload.array('filename'), (req, res) => {
  //如果图片上传成功  返回图片上传的地址
  console.log(req);
  res.json({
    code: 200,
    url: "/uploads/" + req.files[0].filename,
  })
})

module.exports = router;
